<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>9.关于Promise的回调</title>
  </head>
  <body>
    <script type="text/javascript" >
      let x = new Promise((resolve,reject)=>{
        setTimeout(() => {
          reject('你好像一条狗啊')
        }, 3000);
      })
      x.then(
        value => {console.log('成功',value)},
        reason => {console.log('失败',reason)}
      )
    </script>
  </body>
</html>